home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
clipper
/
tcmclp.zip
/
SCRNPLAY.DOC
< prev
next >
Wrap
Text File
|
1989-02-14
|
4KB
|
97 lines
The following routines are for use with Clipper, Summer '87. They are
contributed to the public domain. No warranty or fitness for a particular
use is claimed.
Rick Whitt, SysOp
dBoard BBS - Winston-Salem, NC
(919) 768-3043
June 20, 1988
Most of the following routines are pretty specialized, but if you need
one of them, they can come in real handy !
CHGATTR() - Sets the color ( attribute ) of a specified area of the screen
without disturbing the characters. Useful if you want to change
the color of the screen without re-drawing it. Uses direct
video access for speed.
CHGATTR( t_row, l_col, b_row, r_col, f_attr, b_attr )
Where the first four parameters are the screen coordinates,
and the last 2 are the foreground and background attributes,
as follows:
Black 0 Gray 8
Blue 1 Light blue 9
Green 2 Light green 10
Cyan 3 Light cyan 11
Red 4 Light red 12
Magenta 5 Light magenta 13
Brown 6 Yellow 14
White 7 Bright white 15
Note that only the first 8 are used for background colors.
CLRAREA() - Clears all of the characters from the given screen area
without disturbing the colors.
CLRAREA( t_row, l_col, b_row, r_col )
FILLAREA() - Fills the specified screen area with the given character,
maintaining the existing colors.
FILLAREA( t_row, l_col, b_row, r_col, ascii_char )
Where ascii_char is the character to be used. Note that
this is the ASCII NUMBER of the character ( like 'A' = 65 ).
OVRWRITE() - Writes the specified character at the current cursor
position.
OVRWRITE( ascii_char )
Again, ascii_char is the number of the character.
SWAPATTR() - Inverses the attributes in the given area.
SWAPATTR( t_row, l_col, b_row, r_col )
CHGALL() - Changes all attributes on the screen of a given color
to a 2nd set of attributes. Does not disturb anything
that does not match the first set of attributes.
CHGALL( f_attr1, b_attr1, f_attr2, b_attr2 )
Where all parameters are attribute numbers as given for
CHGATTR(), with the first set the "FROM" attributes and
the 2nd set the "TO" attributes.
READATTR() - Returns the attribute at the given cursor position.
attr = READATTR( row, col )
Note that the returned value is the combined attribute
byte representing both foreground & background. To resolve
this into separate fore & back attributes, make two calls:
f_attr = MOD( READATTR( row, col ), 16 )
b_attr = INT( READATTR( row, col ) / 16 )
READCHAR() - Returns the character displayed at the given coordinates.
ascii_char = READCHAR( row, col )
Where ascii_char is the ASCII NUMBER of the character.